class MyButton extends egret.Shape {
	public constructor( posX = 0, posY = 0 ) {
		super();
		this.drawGrid( posX, posY );
	}

	private drawGrid( posX, posY ) {

		this.graphics.beginFill( 0x0000ff );
		this.graphics.drawRect( 0, 0, 50, 50);
		this.graphics.endFill();

		this.graphics.beginFill( 0x0000ff );
		this.graphics.drawRect( 50, 50, 50, 50);
		this.graphics.endFill();

		this.graphics.beginFill( 0xff0000 );
		this.graphics.drawRect( 50, 0, 50, 50);
		this.graphics.endFill();

		this.graphics.beginFill( 0xff0000 );
		this.graphics.drawRect( 0, 50, 50, 50);
		this.graphics.endFill();

		this.x = posX;
		this.y = posY;
	}
}